]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Handle missing overrides settings
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 3 Jul 2015 20:11:24 +0000 (22:11 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 3 Jul 2015 20:25:29 +0000 (22:25 +0200)
shell_global_get_overrides_settings() may return %NULL in case of
custom shell modes (i.e. not the default and classic ones); while
this is not officially encouraged, we should still handle it rather
than throw an error.

https://bugzilla.gnome.org/show_bug.cgi?id=751921

js/ui/windowManager.js

index 5a86d5ab3be31b8845b9f10e6ca3a838b835751f..e373723174c62105b6a6848e4d3869f0a378566c 100644 (file)
@@ -217,7 +217,8 @@ const WorkspaceTracker = new Lang.Class({
 
     _getWorkspaceSettings: function() {
         let settings = global.get_overrides_settings();
-        if (settings.settings_schema.list_keys().indexOf('dynamic-workspaces') > -1)
+        if (settings &&
+            settings.settings_schema.list_keys().indexOf('dynamic-workspaces') > -1)
             return settings;
         return new Gio.Settings({ schema_id: 'org.gnome.mutter' });
     },